<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .chart {
        width: 800px;
        height: 400px;
      }
    </style>
  </head>
  <body>
    <div class="chart"></div>
    <script src="./echarts.js"></script>
    <script>
      const myChart = echarts.init(document.querySelector(".chart"));
      const option = {
        xAxis: {
          type: "category",
        },
        yAxis: {},
        dataset: {
          source: [
            ["一月", 20, 26, "xx", 22],
            ["二月", 31, 36, "yy", 44],
            ["三月", 24, 23, "zz", 66],
            ["四月", 41, 15],
            ["五月", 30, 28],
            ["六月", 15, 29],
            ["七月", 41, 15],
            ["八月", 30, 28],
            ["九月", 15, 29],
            ["十月", 41, 15],
            ["十一月", 30, 28],
            ["十二月", 15, 29],
          ],
        },
        series: [
          {
            type: "bar",
            encode: { x: 0, y: 1 },
          },
          {
            type: "line",
            encode: { x: 0, y: 2 },
          },
          {
            type: "pie",
            encode: { itemName: 3, value: 4 },
            radius: [0, 30],
            center: ["80%", 40],
          },
        ],
      };
      myChart.setOption(option);
    </script>
  </body>
</html>
